Can't load view when module is not displayed

I have a script where I read a module and then load a view. I'd like the read the module without displaying it. When I use the following code I end up with the standard view:

m = read("Test Module", false)
load view "Export/Import"

If I read the module and display it, then the desired view is loaded:

m = read("Test Module")
load view "Export/Import"

So how can I read the module without displaying it and load the view I want?

Thanks, Don
dmestan - Tue Jun 15 16:01:39 EDT 2010

Re: Can't load view when module is not displayed
Z_T - Thu Jun 17 02:09:05 EDT 2010

try this:
  • Read the module without displaying it,
  • get and store the default view for the user,
  • set the default view for the user to the view you want,
  • re-read the module without displaying it,
  • do works,
  • set the default view for the user back to the old view
  • close the module

just a thought but it might work.